﻿using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZR.Admin.WebApi.Filters;
using ZR.Model.Dto.Business.ProductionControl;
using ZR.Service.IService.ProductionControl;

namespace CKS.MES.Server.Controllers.Business.ProductionControl
{
    /// <summary>
    /// 相机检测数据服务
    /// </summary>
    [Verify]
    [Route("business/CameraDetection")]
    [ApiExplorerSettings(GroupName = "business")]
    public class CameraDetectionController : BaseController
    {
        private readonly ICameraDetectionService _cameraDetectionService;

        public CameraDetectionController(ICameraDetectionService cameraDetectionService)
        {
            _cameraDetectionService = cameraDetectionService;
        }

        /// <summary>
        /// 查询相机数据列表
        /// </summary>
        /// <param name="parm"></param>
        /// <returns></returns>
        [HttpGet("list")]
        [ActionPermissionFilter(Permission = "cameradetection:list")]
        public IActionResult QueryList([FromQuery] CameraDetectionQueryDto parm)
        {
            var response = _cameraDetectionService.GetList(parm);
            return SUCCESS(response);
        }
    }
}